

#@auth.requires_login()
def index():
    redirect(URL(r=request, c='template', f='index'))
    return dict()


def logout():
    """ 退出阿里软件登录 """
    del_ok = ''
    try:
        # 设置 del_ok 默认值
        del_ok = request.args[0]
    except:
        del_ok = del_ok
    
    # 清空所有 session, clear session
#    x = ['session.%s' % i for i in session.keys()]
    if del_ok == 'yes':
#        for i in x:
#            try:
#                exec('del %s') % i
#            except NameError:
#                pass
        session.clear()
        redirect(APPLICATION)
    elif del_ok == 'no':
        redirect(URL(r=request, c='default', f='index'))
    
    return dict(
        )


# # uncomment the following if you have defined "auth" and "crud" in models
#def user(): return dict(form=auth())
#@auth.requires_membership('super')
#def data(): return dict(form=crud())
def download(): return response.download(request,db)
# # tip: use @auth.requires_login, requires_membership, requires_permission

#def call(): return service()
